package presentacion.vista;

import accesoDatos.dao.DaoProducto;
import accesoDatos.util.Archivo;
import accesoDatos.util.Recurso;
import accesoDatos.util.VariablesDeEntorno;
import accesoDatos.vo.Producto;
import java.awt.Image;
import java.io.File;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import presentacion.util.Ventana;
import presentacion.vista.filechooser.MyFileChooser;

/**
 *
 * @author  Yohan ®
 */
public class DialogoCrearProducto extends javax.swing.JDialog {

    private MyFileChooser fileChooser = null;
    private String imagePath = VariablesDeEntorno.getRuta() + "lib" + VariablesDeEntorno.SEPARADOR + "fotos" + VariablesDeEntorno.SEPARADOR + "default.jpg";
    private int mod = 0; //Modificar 1, Crear 0
    private Producto producto = new Producto();
    Recurso r;

    /** Creates new form DialogoCrearProducto */
    public DialogoCrearProducto(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        mod = 0;
        Ventana.centrar(this);
        r= new Recurso();
        ImageIcon icono = new ImageIcon(r.getURL("/presentacion/vista/iconoNuevo.png"));
        setIconImage(icono.getImage());
        botonAgregarImagen.setIcon(new ImageIcon(r.getURL("/presentacion/vista/iconoBuscar.png")));
        botonBorrarImagen.setIcon(new ImageIcon(r.getURL("/presentacion/vista/iconoBorrar.png")));
        botonCambiarContraseña.setIcon(new ImageIcon(r.getURL("/presentacion/vista/iconoTeclado.png")));
    }

    public DialogoCrearProducto(java.awt.Frame parent, boolean modal, int idPro) {
        super(parent, modal);
        initComponents();
        mod = 1;
        Ventana.centrar(this);
        r= new Recurso();
        ImageIcon icono = new ImageIcon(r.getURL("/presentacion/vista/iconoNuevo.png"));
        setIconImage(icono.getImage());
        setTitle("Modificar Producto");
        botonAgregarImagen.setIcon(new ImageIcon(r.getURL("/presentacion/vista/iconoBuscar.png")));
        botonBorrarImagen.setIcon(new ImageIcon(r.getURL("/presentacion/vista/iconoBorrar.png")));
        botonCambiarContraseña.setIcon(new ImageIcon(r.getURL("/presentacion/vista/iconoTeclado.png")));

        producto = DaoProducto.read(idPro);
        nameField.setText(producto.getNombre());
        priceField.setText(String.valueOf(producto.getPrecio()));
        imageLabel.setIcon(producto.getFoto());
        imageLabel.setText("");
        campoTipo.setSelectedItem(producto.getTipo());
        checkIncluirEnMenu.setSelected(producto.getEstaEnMenu());


    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelImagen = new javax.swing.JPanel();
        imageLabel = new javax.swing.JLabel();
        botonAgregarImagen = new javax.swing.JButton();
        botonBorrarImagen = new javax.swing.JButton();
        panelInformacion = new javax.swing.JPanel();
        labelNombre = new javax.swing.JLabel();
        nameField = new javax.swing.JTextField();
        labelTipo = new javax.swing.JLabel();
        campoTipo = new javax.swing.JComboBox();
        labelPrecio = new javax.swing.JLabel();
        priceField = new javax.swing.JTextField();
        checkIncluirEnMenu = new javax.swing.JCheckBox();
        panelBotones = new javax.swing.JPanel();
        botonAceptar = new javax.swing.JButton();
        botonCancelar = new javax.swing.JButton();
        botonCambiarContraseña = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Nuevo producto");
        setResizable(false);

        panelImagen.setBorder(javax.swing.BorderFactory.createTitledBorder("Imagen"));

        imageLabel.setFont(new java.awt.Font("Tahoma", 2, 11));
        imageLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        imageLabel.setText("<< sin imagen >>");
        imageLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        imageLabel.setOpaque(true);

        botonAgregarImagen.setBorderPainted(false);
        botonAgregarImagen.setContentAreaFilled(false);
        botonAgregarImagen.setFocusPainted(false);
        botonAgregarImagen.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                botonMouseExited(evt);
            }
        });
        botonAgregarImagen.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                botonMouseMoved(evt);
            }
        });
        botonAgregarImagen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAgregarImagenActionPerformed(evt);
            }
        });

        botonBorrarImagen.setBorderPainted(false);
        botonBorrarImagen.setContentAreaFilled(false);
        botonBorrarImagen.setFocusPainted(false);
        botonBorrarImagen.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                botonMouseExited(evt);
            }
        });
        botonBorrarImagen.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                botonMouseMoved(evt);
            }
        });
        botonBorrarImagen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonBorrarImagenActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelImagenLayout = new javax.swing.GroupLayout(panelImagen);
        panelImagen.setLayout(panelImagenLayout);
        panelImagenLayout.setHorizontalGroup(
            panelImagenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelImagenLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelImagenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(imageLabel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 174, Short.MAX_VALUE)
                    .addGroup(panelImagenLayout.createSequentialGroup()
                        .addComponent(botonAgregarImagen, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 75, Short.MAX_VALUE)
                        .addComponent(botonBorrarImagen, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        panelImagenLayout.setVerticalGroup(
            panelImagenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelImagenLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(imageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(panelImagenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botonAgregarImagen, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE)
                    .addComponent(botonBorrarImagen, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE))
                .addContainerGap())
        );

        panelInformacion.setBorder(javax.swing.BorderFactory.createTitledBorder("Informacion de producto"));

        labelNombre.setText("Nombre:");

        nameField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                nameFieldKeyTyped(evt);
            }
        });

        labelTipo.setText("Tipo:");

        campoTipo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Bebida", "Sopa", "Plato Fuerte", "Ensalada", "Acompañamiento", "Postre" }));

        labelPrecio.setText("Precio ($):");

        priceField.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
        priceField.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                priceFieldKeyTyped(evt);
            }
        });

        checkIncluirEnMenu.setSelected(true);
        checkIncluirEnMenu.setText("Incluir en menu");

        javax.swing.GroupLayout panelInformacionLayout = new javax.swing.GroupLayout(panelInformacion);
        panelInformacion.setLayout(panelInformacionLayout);
        panelInformacionLayout.setHorizontalGroup(
            panelInformacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelInformacionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelInformacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelInformacionLayout.createSequentialGroup()
                        .addComponent(labelNombre)
                        .addGap(26, 26, 26)
                        .addComponent(nameField, javax.swing.GroupLayout.DEFAULT_SIZE, 211, Short.MAX_VALUE))
                    .addComponent(checkIncluirEnMenu, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(panelInformacionLayout.createSequentialGroup()
                        .addGroup(panelInformacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelTipo)
                            .addComponent(labelPrecio))
                        .addGap(17, 17, 17)
                        .addGroup(panelInformacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(priceField, javax.swing.GroupLayout.DEFAULT_SIZE, 211, Short.MAX_VALUE)
                            .addComponent(campoTipo, 0, 211, Short.MAX_VALUE))))
                .addContainerGap())
        );
        panelInformacionLayout.setVerticalGroup(
            panelInformacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelInformacionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(panelInformacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelNombre))
                .addGap(18, 18, 18)
                .addGroup(panelInformacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(campoTipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelTipo))
                .addGap(18, 18, 18)
                .addGroup(panelInformacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelPrecio)
                    .addComponent(priceField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 109, Short.MAX_VALUE)
                .addComponent(checkIncluirEnMenu)
                .addContainerGap())
        );

        botonAceptar.setText("Aceptar");
        botonAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAceptarActionPerformed(evt);
            }
        });

        botonCancelar.setText("Cancelar");
        botonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonCancelarActionPerformed(evt);
            }
        });

        botonCambiarContraseña.setBorderPainted(false);
        botonCambiarContraseña.setContentAreaFilled(false);
        botonCambiarContraseña.setFocusPainted(false);
        botonCambiarContraseña.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseExited(java.awt.event.MouseEvent evt) {
                botonMouseExited(evt);
            }
        });
        botonCambiarContraseña.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseMoved(java.awt.event.MouseEvent evt) {
                botonMouseMoved(evt);
            }
        });
        botonCambiarContraseña.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonCambiarContraseñaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelBotonesLayout = new javax.swing.GroupLayout(panelBotones);
        panelBotones.setLayout(panelBotonesLayout);
        panelBotonesLayout.setHorizontalGroup(
            panelBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelBotonesLayout.createSequentialGroup()
                .addComponent(botonCambiarContraseña)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 270, Short.MAX_VALUE)
                .addComponent(botonAceptar, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(botonCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        panelBotonesLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {botonAceptar, botonCancelar});

        panelBotonesLayout.setVerticalGroup(
            panelBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(botonCancelar)
                .addComponent(botonAceptar))
            .addComponent(botonCambiarContraseña, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(panelBotones, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(panelInformacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(panelImagen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(panelInformacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(panelImagen, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 29, Short.MAX_VALUE)
                .addComponent(panelBotones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    private void botonAgregarImagenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAgregarImagenActionPerformed
        if (fileChooser == null) {
            fileChooser = new MyFileChooser();
        }

        File file = fileChooser.getFile(new File(System.getProperty("user.home")), this);
        imagePath = file.getPath();
        if (file != null) {
            ImageIcon imagenOriginal = new ImageIcon(file.getPath());
            if (imagenOriginal.getIconHeight() > imagenOriginal.getIconWidth()) {
                imageLabel.setIcon(new ImageIcon(imagenOriginal.getImage().getScaledInstance(-1, 170, Image.SCALE_DEFAULT)));
            } else {
                imageLabel.setIcon(new ImageIcon(imagenOriginal.getImage().getScaledInstance(170, -1, Image.SCALE_DEFAULT)));
            }
            imageLabel.setText("");
        }
}//GEN-LAST:event_botonAgregarImagenActionPerformed

    private void botonCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonCancelarActionPerformed
        dispose();
    }//GEN-LAST:event_botonCancelarActionPerformed

    private void botonBorrarImagenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonBorrarImagenActionPerformed
        imagePath = VariablesDeEntorno.getRuta() + "lib" + VariablesDeEntorno.SEPARADOR + "fotos" + VariablesDeEntorno.SEPARADOR + "default.jpg";
        imageLabel.setIcon(null);
        imageLabel.setText("<< sin imagen >>");
    }//GEN-LAST:event_botonBorrarImagenActionPerformed

    private void botonAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAceptarActionPerformed
        String message = "";
        if (nameField.getText().equals("") || priceField.getText().equals("")) {
            if (nameField.getText().equals("")) {
                message += "El campo nombre no puede estar vacio \n";
            }
            if (priceField.getText().equals("")) {
                message += "El campo precio no puede estar vacio \n";
            }
            JOptionPane.showMessageDialog(this, message);
            return;
        }




        if (mod == 0) {
            int id = DaoProducto.readAll().size() + 1;
            Archivo.copiar(new File(imagePath),
                    new File(VariablesDeEntorno.getRuta() + "lib" + VariablesDeEntorno.SEPARADOR + "fotos" + VariablesDeEntorno.SEPARADOR + id + ".jpg"));
            Producto p = new Producto(nameField.getText(), (String) campoTipo.getSelectedItem(), Double.parseDouble(priceField.getText()));
            p.setEstaEnMenu(checkIncluirEnMenu.isSelected());
            p.setFoto(
                    new ImageIcon(VariablesDeEntorno.getRuta() + "lib" + VariablesDeEntorno.SEPARADOR + "fotos" + VariablesDeEntorno.SEPARADOR + id + ".jpg"));
            DaoProducto.create(p);
        } else {
            int id = producto.getId();            
            Archivo.copiar(new File(imagePath),
                    new File(VariablesDeEntorno.getRuta() + "lib" + VariablesDeEntorno.SEPARADOR + "fotos" + VariablesDeEntorno.SEPARADOR + id + ".jpg"));
            producto.setNombre(nameField.getText());
            producto.setTipo((String) campoTipo.getSelectedItem());
            producto.setPrecio(Double.parseDouble(priceField.getText()));
            producto.setEstaEnMenu(checkIncluirEnMenu.isSelected());
            producto.setFoto(new ImageIcon(VariablesDeEntorno.getRuta() + "lib" + VariablesDeEntorno.SEPARADOR + "fotos" + VariablesDeEntorno.SEPARADOR + id + ".jpg"));
            DaoProducto.update(producto);
        }

        dispose();            
    }//GEN-LAST:event_botonAceptarActionPerformed

    private void priceFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_priceFieldKeyTyped
        char caracter = evt.getKeyChar();

        if (priceField.getText().length() > 4) {
            evt.consume();
        }

        if ((caracter >= '0') && (caracter <= '9')) {
            return;
        } else {
            evt.consume();
        }
}//GEN-LAST:event_priceFieldKeyTyped

    private void nameFieldKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_nameFieldKeyTyped
        if (nameField.getText().length() > 50) {
            evt.consume();
        }
}//GEN-LAST:event_nameFieldKeyTyped

    private void botonMouseMoved(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonMouseMoved
        JButton boton = (JButton) evt.getComponent();
        boton.setContentAreaFilled(true);
        boton.setBorderPainted(true);
}//GEN-LAST:event_botonMouseMoved

    private void botonMouseExited(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonMouseExited
        JButton boton = (JButton) evt.getComponent();
        boton.setContentAreaFilled(false);
        boton.setBorderPainted(false);
}//GEN-LAST:event_botonMouseExited

    private void botonCambiarContraseñaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonCambiarContraseñaActionPerformed
        TecladoEnPantalla.mostrar();
    }//GEN-LAST:event_botonCambiarContraseñaActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                DialogoCrearProducto dialog = new DialogoCrearProducto(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {

                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botonAceptar;
    private javax.swing.JButton botonAgregarImagen;
    private javax.swing.JButton botonBorrarImagen;
    private javax.swing.JButton botonCambiarContraseña;
    private javax.swing.JButton botonCancelar;
    private javax.swing.JComboBox campoTipo;
    private javax.swing.JCheckBox checkIncluirEnMenu;
    private javax.swing.JLabel imageLabel;
    private javax.swing.JLabel labelNombre;
    private javax.swing.JLabel labelPrecio;
    private javax.swing.JLabel labelTipo;
    private javax.swing.JTextField nameField;
    private javax.swing.JPanel panelBotones;
    private javax.swing.JPanel panelImagen;
    private javax.swing.JPanel panelInformacion;
    private javax.swing.JTextField priceField;
    // End of variables declaration//GEN-END:variables
}
